package com.wjy.Seckill.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wjy.Seckill.dao.CommodityDao;
import com.wjy.Seckill.entity.Commodity;
import com.wjy.Seckill.service.CommodityService;

@Service
public class CommodityServiceImpl implements CommodityService {

	@Autowired
	private CommodityDao commodityDao;

	@Override
	public List<Commodity> getCommodityList() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Commodity getById(Long commodityId) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean addCommodity(Commodity commodity) {
		int temp = commodityDao.addCommodity(commodity);
		if (temp != 1) {
			return false;
		} else {
			return true;
		}
	}

}
